<div bsModal #createOrEditModal="bs-modal" class="modal fade" tabindex="-1" role="dialog"
    aria-labelledby="createOrEditModal" aria-hidden="true" [config]="{backdrop: 'static'}">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <form *ngIf="active" #editForm="ngForm" novalidate (ngSubmit)="save()" autocomplete="off">
                <div class="modal-header">
                    <h4 class="modal-title">
                        <span>编辑材料</span>
                    </h4>
                    <button type="button" class="close" (click)="close()" [attr.aria-label]="l('Close')">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <div class="modal-body">

                    <div class="row">
                        <div class="col-md-6">
                            <div class="form-group">
                                <label for="taskCode">任务号</label>
                                <input type="text" name="taskCode" class="form-control"
                                    [(ngModel)]="material.materialForProduct.requestedTaskNum" required>
                                <!-- <validation-messages [formCtrl]="taskCodeInput"></validation-messages> -->
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="form-group">
                                <label for="drawingCode">图号</label>
                                <input type="text" name="drawingCode" class="form-control"
                                    [(ngModel)]="material.materialForProduct.requestedDrawingNum">
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-md-6">
                            <div class="form-group">
                                <label for="materialName">材料名</label>
                                <input type="text" name="materialName" class="form-control"
                                    [(ngModel)]="material.materialForProduct.displayName">
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="form-group">
                                <label for="invFurBatch">炉批号</label>
                                <input type="text" name="invFurBatch" class="form-control"
                                    [(ngModel)]="material.materialForProduct.furnaceBatch">
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-md-6">
                            <div class="form-group">
                                <label for="hgz_zjd">质检单号</label>
                                <input type="text" name="hgz_zjd" class="form-control"
                                    [(ngModel)]="material.materialForProduct.qualityCheckBillNo">
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="form-group">
                                <label for="invCode">物资编码</label>
                                <input type="text" name="invCode" class="form-control"
                                    [(ngModel)]="material.materialForProduct.materialCode">
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-md-6">
                            <div class="form-group">
                                <label for="paiHao">牌号</label>
                                <input type="text" name="paiHao" class="form-control"
                                    [(ngModel)]="material.materialForProduct.materialModel">
                            </div>
                        </div>
                        <div class="col-md-6">

                            <div class="form-group">
                                <label for="materialStatus">材料状态</label>
                                <input type="text" name="materialStatus" class="form-control"
                                    [(ngModel)]="material.materialForProduct.materialStatus">
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-md-6">
                            <div class="form-group">
                                <label for="materialSpec">规格</label>
                                <input type="text" name="materialSpec" class="form-control"
                                    [(ngModel)]="material.materialForProduct.specification">
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="form-group">
                                <label for="materialSize">尺寸</label>
                                <input type="text" name="materialSize" class="form-control"
                                    [(ngModel)]="material.materialForProduct.size">
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-md-6">
                            <div class="form-group">
                                <label for="invMeasName">计量单位</label>
                                <input type="text" name="invMeasName" class="form-control"
                                    [(ngModel)]="material.materialForProduct.unit">
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="form-group">
                                <label for="invDepMeasName">副计量单位</label>
                                <input type="text" name="invDepMeasName" class="form-control"
                                    [(ngModel)]="material.materialForProduct.deputyUnit">
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-md-6">
                            <div class="form-group">
                                <label for="techCondition">技术状态</label>
                                <input type="text" name="techCondition" class="form-control"
                                    [(ngModel)]="material.materialForProduct.techCondition">
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="form-group">
                                <label for="itemAmount">数量</label>
                                <input type="text" name="zhuanYongInfo" class="form-control"
                                    [(ngModel)]="material.materialForProduct.itemAmount">
                            </div>
                        </div>
                    </div>

                    <div class="row">
                        <div class="col-md-6">
                            <div class="form-group">
                                <label for="hgzNo">合格证</label>
                                <input type="text" name="hgzNo" class="form-control"
                                    [(ngModel)]="material.materialForProduct.certificateNo">
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="form-group">
                                <label for="baoGuanDate">存储期止</label>
                                <p-calendar [(ngModel)]="storageDateEnd" name="storageDateEnd" dateFormat="yy年m月d日"
                                    [utc]="'true'"
                                    [inputStyle]="{'width':'360px','height':'40px', 'padding-left':'20px'}"
                                    [inputStyleClass]="'form-control'"></p-calendar>
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="remark">车间备注</label>
                        <textarea id="remark" class="form-control" type="text" name="remark"
                            [(ngModel)]="material.materialForProduct.workshopRemark" rows="3"></textarea>
                    </div>
                </div>
                <div class="modal-footer">
                    <button [disabled]="saving" type="button" class="btn btn-default" (click)="close()">取消</button>
                    <button type="submit" class="btn btn-primary" [disabled]="!editForm.form.valid"
                        [buttonBusy]="saving" [busyText]="l('SavingWithThreeDot')"><i class="fa fa-save"></i>
                        <span>保存</span></button>
                </div>
            </form>
        </div>
    </div>
</div>
